package org.ccay.enumerable;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
//import org.tinygroup.beancontainer.BeanContainerFactory;
//import org.tinygroup.springutil.ExtendsSpringBeanContainer;
import org.springframework.context.ApplicationContextAware;


/**
 *枚举类型帮助类
 * @author chaowangbang
 * @since 2016年9月4日
 */
public class EnumUtil implements ApplicationContextAware {
	/**
	 * Spring应用上下文环境
	 */
	private static ApplicationContext applicationContext;
	private EnumUtil() {
	};

	public static org.ccay.enumerable.Enum getInstance() {
		return applicationContext.getBean(DefaultEnumHelp.class);
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		EnumUtil.applicationContext = applicationContext;
	}
}
